//
//  DiaryDetailCell.m
//  Lovely Food
//
//  Created by 李经纬 on 15/12/8.
//  Copyright © 2015年 李经纬. All rights reserved.
//

#import "DiaryDetailCell.h"
#define KscreenHeight [[UIScreen mainScreen] bounds].size.height
#define KscreenWidth [[UIScreen mainScreen] bounds].size.width
@implementation DiaryDetailCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews
{
    self.textLabels = [[UILabel alloc]init];
    //self.textLabels.backgroundColor = [UIColor redColor];
    self.textLabels.numberOfLines = 0;
    [self.contentView addSubview:self.textLabels];
    
    
    self.imageViews = [[UIImageView alloc]init];
    //self.imageViews.backgroundColor = [UIColor yellowColor];
    self.imageViews.contentMode = UIViewContentModeScaleAspectFit;
    [self.contentView addSubview:self.imageViews];
    
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.textLabels.frame = CGRectMake(0, 0, KscreenWidth,self.contentView.frame.size.height);
    self.imageViews.frame = CGRectMake(0, 0, KscreenWidth,self.contentView.frame.size.height);
}

+(CGFloat)cellHeight:(CGFloat)height
{
    return height;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end

